Skip to content

Migrate HTML ebook to read from Convex database#25

Open
Selcukatli wants to merge 5 commits intomainfrom
Selcukatli/ebook-parser-review
Open

Migrate HTML ebook to read from Convex database#25
Selcukatli wants to merge 5 commits intomainfrom
Selcukatli/ebook-parser-review

Conversation

@Selcukatli
Copy link
Copy Markdown
Owner

Summary

  • Add Convex schema for ebook content (drafts, parts, chapters, blocks, figures)
  • Create mutations for AI editing: insert, update, delete, move blocks
  • Create queries for reading ebook content from Convex
  • Add migration scripts for figures and content import
  • Update all ebook pages to use Convex instead of filesystem
  • Fix hydration error when images appear in paragraphs

Test plan

  • Build passes with all 31 pages generated
  • Ebook content loads from Convex database
  • Manual test of ebook navigation

🤖 Generated with Claude Code

Selcukatli and others added 2 commits December 30, 2025 00:13
- Add `figure` code fence syntax for embedding generation prompts in markdown
- Create figure parser (src/lib/ebook-figure-parser.ts) to extract specs
- Add LLM-enhanced prompt generation with style presets (3D isometric visual identity)
- Create parallel figure generation script (scripts/generate-ebook-figures.mjs)
- Update generateEbookFigure Convex action with style parameter
- Update CLAUDE.md with comprehensive figure spec documentation
- Include test figure to validate generation pipeline

Style presets match existing ebook figures:
- 3D isometric perspective with depth and polish
- Color palette: dark teal/navy (#1e3a5f), amber/gold (#f59e0b)
- Glossy surfaces with gradients and lighting effects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 5 new ebook tables to Convex schema (ebookDrafts, ebookParts,
  ebookChapters, ebookBlocks, ebookFigures)
- Create mutations for AI editing: insert, update, delete, move blocks
- Create queries for reading ebook content from Convex
- Add migration scripts for figures and content import
- Update all ebook pages to read from Convex instead of filesystem
- Fix hydration error when images appear in paragraphs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Dec 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
pivotpyramid Ready Ready Preview, Comment Dec 30, 2025 7:17pm

- Fixed insertBlock to append blocks at the end when afterBlockId is not provided
  (was incorrectly prepending at the beginning)
- Added clearDraftContent mutation for reimporting content
- Added --force flag to import script to clear and reimport

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added *.convex.cloud to remotePatterns in next.config.js to allow
ebook figures stored in Convex storage to be served via next/image.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add edit mode for ebook chapters with block-based editing
- Implement FigureBlockEditor with compact inline view
- Create FigureLightbox modal with Generate/Upload tabs
- Support AI image generation via Fal AI with LLM-enhanced prompts
- Add drag-and-drop block reordering with @dnd-kit
- Implement slash command menu for block type conversion
- Add authentication check for edit mode access
- Extend mutations for figure metadata (prompt, style, dimensions)
- Fix handle colors to avoid amber/figure border confusion
- Add delete button on figure blocks (hover state)
- Lock body scroll when lightbox is open

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant